using UnityEngine;

public class BulletCollider : MonoBehaviour
{
    public GameObject ParentObj;

    private Bullet bullet;
    void Awake()
    {
        bullet = ParentObj.GetComponent<Bullet>();
    }

    private void OnTriggerEnter2D(Collider2D other)
    {
        bullet.Damage(other.gameObject, other.ClosestPoint(transform.position));
    }
}
